
class AlarmVehicleItem {
    String alarmInfo;
    String alarmLocation;
    String alarmTime;
    String alarmType;
    String alarmTypeName;
    int areaId;
    String carNumber;
    String carType;
    String departName;
    int driverBindType;
    int driverId;
    String driverName;
    String floorNo;
    String handleInfo;
    String handleTime;
    int id;
    double lat;
    double lng;
    String status;
    String vehicleSn;
    double x;
    double y;

    AlarmVehicleItem({this.alarmInfo, this.alarmLocation, this.alarmTime, this.alarmType,this.alarmTypeName, this.areaId, this.carNumber, this.carType, this.departName, this.driverBindType, this.driverId, this.driverName, this.floorNo, this.handleInfo, this.handleTime, this.id, this.lat, this.lng, this.status, this.vehicleSn, this.x, this.y});

    factory AlarmVehicleItem.fromJson(Map<String, dynamic> json) {
        return AlarmVehicleItem(
            alarmInfo: json['alarmInfo'], 
            alarmLocation: json['alarmLocation'], 
            alarmTime: json['alarmTime'], 
            alarmType: json['alarmType'],
            alarmTypeName:json['alarmTypeName'],
            areaId: json['areaId'], 
            carNumber: json['carNumber'], 
            carType: json['carType'], 
            departName: json['departName'], 
//            driverBindType: json['driverBindType'] != null ? int.fromJson(json['driverBindType']) : null,
//            driverId: json['driverId'] != null ? int.fromJson(json['driverId']) : null,
//            driverName: json['driverName'] != null ? String.fromJson(json['driverName']) : null,
            floorNo: json['floorNo'], 
            handleInfo: json['handleInfo'], 
            handleTime: json['handleTime'], 
            id: json['id'], 
            lat: json['lat'], 
            lng: json['lng'], 
            status: json['status'], 
            vehicleSn: json['vehicleSn'], 
            x: json['x'], 
            y: json['y'], 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['alarmInfo'] = this.alarmInfo;
        data['alarmLocation'] = this.alarmLocation;
        data['alarmTime'] = this.alarmTime;
        data['alarmType'] = this.alarmType;
        data['alarmTypeName'] = this.alarmTypeName;
        data['areaId'] = this.areaId;
        data['carNumber'] = this.carNumber;
        data['carType'] = this.carType;
        data['departName'] = this.departName;
        data['floorNo'] = this.floorNo;
        data['handleInfo'] = this.handleInfo;
        data['handleTime'] = this.handleTime;
        data['id'] = this.id;
        data['lat'] = this.lat;
        data['lng'] = this.lng;
        data['status'] = this.status;
        data['vehicleSn'] = this.vehicleSn;
        data['x'] = this.x;
        data['y'] = this.y;
//        if (this.driverBindType != null) {
//            data['driverBindType'] = this.driverBindType.toJson();
//        }
//        if (this.driverId != null) {
//            data['driverId'] = this.driverId.toJson();
//        }
//        if (this.driverName != null) {
//            data['driverName'] = this.driverName.toJson();
//        }
        return data;
    }
}